@extends('layouts.app')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-10 col-md-offset-1">
                <div class="panel panel-default">
                    <div class="panel-heading">展示资源页
                        <a  href="{{url('resource/create')}}">添加</a>
                    </div>
                    @if (count($errors) > 0)
                        <div class="alert alert-danger">
                            <ul>
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif
                    <table class="table table-hover">
                        <tr>
                            <td class="success">资源id</td>
                            <td class="success">姓名</td>
                            <td class="success">基本信息</td>
                            <td class="success">资源进程</td>

                            <td class="success">
                                操作
                            </td>
                        </tr>
                        @foreach($datas as $data)
                            <tr>
                                <td class="active">{{$data->id}}</td>
                                <td class="active">{{$data->name}}</td>
                                <td class="active">
                                    <select name="" id="" class="form-control">
                                        <option value="">手机:{{$data->phone}}</option>
                                        <option value="">备机:{{$data->phone2}}</option>
                                        <option value="">QQ:{{$data->qq}}</option>
                                        <option value="">微信:{{$data->wechat}}</option>
                                        <option value="">预算:{{$data->budget}}</option>
                                        <option value="">创建时间:{{$data->created_at}}</option>
                                        <option value="">录入人:{{$data->users_id}}</option>
                                        <option value="">邀约主管:{{$data->yyzg_id}}</option>
                                        <option value="">分配时间:{{date('y-m-d',$data->yyzg_time)}}</option>
                                        <option value="">邀约员工:{{$data->yyyg_id}}</option>
                                        <option value="">员工操作时间:{{date('y-m-d',$data->yyyg_time)}}</option>
                                    </select>
                                </td>
                                <td class="active">{{$data->process_id}}</td>

                                <td class="active">
                                    <a href="{{url('resource/remark')}}/{{$data->id}}">显示详情</a>
                                    <a href="{{url('resource/edit')}}/{{$data->id}}">编辑</a>
                                    <a href="{{url('resource/destroy')}}/{{$data->id}}">删除</a>
                                </td>
                            </tr>
                        @endforeach
                    </table>
                </div>
            </div>
        </div>
    </div>
@endsection